package com.itheima.dateDemo;

import java.time.*;

public class LocalDateTimeDemo09 {
    public static void main(String[] args) {
        //LocalDateTime nowLocalDateTime = LocalDateTime.now();
        LocalDate nowLocalDate = LocalDate.now();
        //LocalDateTime newLocalDateTime = LocalDateTime.of(2021, 05, 09, 00, 00, 00);
        LocalDate newLocalDate = LocalDate.of(2021, 5, 9);

        Period between = Period.between(nowLocalDate, newLocalDate);
        System.out.println(between);

        System.out.println(between.getYears());

        System.out.println(between.getMonths());

        System.out.println(between.getDays());
    }
}
